package com.reebake.ideal.message.controller.client;

import com.reebake.ideal.message.client.MessageClient;
import com.reebake.ideal.message.entity.MessageSendDTO;
import com.reebake.ideal.message.entity.TemplateMessageSendDTO;
import com.reebake.ideal.message.service.MessageOperationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class MessageClientController implements MessageClient {

	@Autowired
	private MessageOperationService messageOperationService;

	@Override
	public void sendTemplate(@RequestBody TemplateMessageSendDTO templateMessageSendDTO) {
		messageOperationService.sendTemplate(templateMessageSendDTO);
	}

	@Override
	public void send(MessageSendDTO messageSendDTO) {
		messageOperationService.send(messageSendDTO);
	}
}
